Computer software applications such as word processors, data bases and spreadsheets are used throughout the world for input, manipulation, transmission, display, and printing of data in the form of numbers and text in a variety of different languages.
According to the rules of some spoken languages, for example, English, text is written, displayed, printed and read from left-to-right. However, a number of other languages including Arabic languages, such as Arabic and Farsi, for example, read, write, display and print horizontal text from right-to-left. Some spoken languages, such as Hebrew, are rendered bi-directionally. That is, certain portions of such languages are rendered left-to-right while other portions of those languages are rendered right-to-left. For example, according to the rules of the Hebrew language, text is rendered on a computer display or printout in a right-to-left configuration, but numeric formulas are rendered from left-to-right. Such bi-directional text rendering rules create ambiguities that make it difficult for a computer software application, such as a word processor to properly order and display or print the desired text.
Standards exist for prescribing the order of text according to the rules of various spoken languages. One such standard is the Unicode standard. The Unicode standard attempts to assign a number to every letter or other character used in all rendered languages so that computer encoded text and numbers may be transferred from one computer platform to another without the need for different encoding schemes to handle different spoken languages. The Unicode standard prescribes a memory representation order known as logical order, and the Unicode standard prescribes a number of algorithms and rules for determining the proper order for rendering text and numbers, including bi-directional text. In particular, directional formatting codes have been developed for the Unicode standard for influencing the display ordering of bi-directional text. The characters are still interpreted in a logical order, for example, the order in which the characters were input into memory, but the directional formatting codes are used to ensure proper display of the bi-directional text because the display ordering of the bi-directional text depends on the directional properties of the characters in the text.
In the Hebrew language, certain neutral characters such as the hyphen character (“-”) create special difficulties for displaying Hebrew text. As discussed above, according to the rules of the Hebrew language, text is rendered in a right-to-left configuration, while numeric formulas are rendered in a left-to-right configuration. For example, the text “I live in the house on the left” rendered according to the rules of the Hebrew language would be rendered in a right-to-left configuration. However, the numeric formula “3−2=1” would be rendered in a left-to-right configuration according to the rules of the Hebrew language.
In order to deal with neutral characters such as hyphens that are not specific to any particular spoken language, the Unicode standard defines neutrals and how they should be rendered. Under one classification known as the European Terminator (“ET”), hyphens or minus signs are rendered according to the same rules as numbers if those neutrals are touched on either side by a number. Some neutral characters, however, are classified as European Separators (“ES”) and are rendered according to the same rules for rendering numbers only if they are touched on both sides by numbers. The hyphen or minus sign is classified by the Unicode standard as a European Terminator character. Because text rendered according to the Hebrew language is bi-directional, as discussed above, ambiguities continue to exist in circumstances where text includes a combination of letters, hyphens and numbers, such as the text “I live in house-12.”
Some word processors have been developed to utilize the Unicode standard to solve the problem of rendering text in a bi-directional environment, such as Hebrew. In some systems, the hyphen is treated as a number and the numbers and hyphens are marked and treated as if typed on an English keyboard in a Hebrew language environment. That method addresses the problem of rendering numeric formulas in a Hebrew language environment, but does not address the problem of text containing Hebrew letters followed by a hyphen followed by a number such as the exemplary text described above.
Other systems have been developed for following a standard such as the Unicode standard and solving remaining ambiguities caused by bi-directional text, and in particular situations like the hyphen in the Hebrew language, by keeping track of information on the keyboard used to input and save the information. That is, by following a standard such as the Unicode standard and by knowing whether the text was input using a Hebrew configured keyboard or an English configured keyboard, for example, the word processing system can better render the layout of the text according to the rules of the original language, Hebrew in this case. Such systems often require the user to keep track of different keyboard configurations and require the user to toggle between different keyboard settings. Such systems are at best making certain assumptions about the rendering of the text based on the keyboard that was used, and such systems do not solve the problem of properly rendering text input by a previous version of the word processing system or by a separate word processing system that did not contain the functionality of utilizing the Unicode standard and information on the type of keyboard used.
It is with respect to these considerations and others that the present invention has been made.